package com.rightsidetech.system.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Author: yhr
 * @Date: 2021-12-20 12:55
 */
@Data
public class LoginAppReq implements Serializable {
    @ApiModelProperty(value = "登录名或手机号",required = true)
    @NotBlank(message = "登录名或手机号不能为空")
    @Pattern(regexp = "^$|^[a-zA-Z0-9_]{2,12}$",message = "帐号字母数字下划线任意组成长度最大12位")
    private String loginName;
    @ApiModelProperty(value = "密码",required = true)
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^$|^[a-zA-Z0-9_!@#$%^&*?.,:;]{6,20}$", message = "密码由字母数字特殊字符任意组成长度在6-20之间")
    private String password;

    @ApiModelProperty(value = "手机设备号(app使用)")
    private String deviceId;
    @ApiModelProperty(value = "设备类型1,安卓 2,ios(app使用)")
    private Byte deviceType;
}
